<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>修改汽车信息</title>
  <link rel="stylesheet" href="./../styles.css">
</head>
<body>
  <header>
    <h1>修改汽车信息</h1>
    <nav>
      <ul> 
      	<li><a href="./../index.jsp">主页</a></li>
        <li><a href="getList.action">系统管理</a></li>
        <li><a href="../Customer/customer-management.jsp">客户信息管理</a></li>
        <li><a href="../Car/car-management.jsp">汽车信息管理</a></li>
        <li><a href="../Employee/employee-management.jsp">员工信息管理</a></li>
        <li><a href="../Sale/sales-management.jsp">销售信息管理</a></li>
      </ul>
    </nav>
  </header>

  <div class="content">
    <h2>请输入汽车信息</h2>
<form action="updateCar.action" method="post">
    <input type="hidden" id="car.carId" name="car.carId" value="${car.carId}">
    <label for="carModel">车型：</label>
    <input type="text" id="car.carModel" name="car.carModel" value="${car.carModel}" required><br>

    <label for="version">版本：</label>
    <input type="text" id="car.version" name="car.version" value="${car.version}" required><br>

    <label for="year">年款：</label>
    <input type="text" id="car.year" name="car.year" value="${car.year}" required><br>

    <label for="color">颜色：</label>
    <input type="text" id="car.color" name="car.color" value="${car.color}" required><br>

    <label for="price">价格：</label>
    <input type="number" id="car.price" name="car.price" value="${car.price}" step="0.01" required><br>

    <label for="stock">库存量：</label>
    <input type="number" id="car.stock" id="car.stock" name="car.stock" value="${car.stock}" required><br>

    <label>状态：</label>
	<input type="radio" id="statusOnSale" name="car.status" value="在售" ${car.status == '在售' ? 'checked' : ''}/> 在售
	<input type="radio" id="statusPreSale" name="car.status" value="预售" ${car.status == '预售' ? 'checked' : ''}/> 预售
	<input type="radio" id="statusOffSale" name="car.status" value="停售" ${car.status == '停售' ? 'checked' : ''}/> 停售
	<br>

    <button type="submit">提交</button>
</form>

  </div>
</body>
</html>
